home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
asprog.EXE
/
DEVAM.ASM
< prev
next >
Wrap
Assembly Source File
|
1995-10-01
|
2KB
|
111 lines
STDin EQU 0
MAXbuf EQU 40000
MAXX EQU 80
MAXY EQU 24
Code SEGMENT
Assume CS:Code , DS:Code , ES:Code
ORG 100h
Main : call More
mov ah,4ch
int 21h
More Proc NEAR
MoreMN :call ReadBuf
jnb Read_ok
ret
Read_ok:mov cx,BufSize
mov si,offset Buffer
_loop : cmp word ptr[si],0d0ah
jz eoline
cmp word ptr[si],0a0dh
jz eoline
lodsb
mov dl,al
mov ah,2
int 21h
inc NoX
cmp NoX,MAXX
jnz GoOnMr
inc NoY
mov NoX,0
cmp NoY,MAXY
jz typMore
GoOnMr :loop _loop
cmp MoreBuf,1
jz MoreMN
ret
eoline :lodsb
mov dl,al
mov ah,2
int 21h
lodsb
mov dl,al
mov ah,2
int 21h
dec cx
mov NoX,0
inc NoY
cmp NoY,MAXY
jnz GoOnMr
typMore:push cx si
mov cx,TxtSize
mov si,offset MoreStr
Type_l: lodsb
mov ah,2
mov dl,al
int 21h
loop Type_l
xor ax,ax
int 16h
mov ah,2
mov dl,13
int 21h
mov ah,2
mov dl,10
int 21h
mov NoX,0
mov NoY,0
pop si cx
jmp GoOnMr
More ENDp
ReadBuf Proc NEAR
mov ah,3fh
mov bx,STDin
mov cx,MAXbuf + 1
mov dx,offset Buffer
int 21h
mov BufSize,ax
cmp ax,MAXbuf
jz m_Bufer
cmp ax,0
jz no_read
mov MoreBuf,0
jmp short go_out
clc
m_Bufer:mov MoreBuf,1
clc
jmp short go_out
no_read:stc
go_out :ret
ReadBuf ENDp
TxtBeg EQU THIS BYTE
MoreStr DB '─ Dahasì var.....'
TxtSize EQU $ - TxtBeg
NoX DB 0
NoY DB 0
BufSize DW 0
MoreBuf DB 0
Buffer DB MAXbuf DUP(?)
Code ENDs
END Main